 <div class="row">
<div class="twelve columns header">
 <?php
 		if($this->uri->segment(6) === FALSE){
			echo form_open_multipart('taak/addTaak/client_id/'.$this->uri->segment(4));
		}
		else {
			echo form_open_multipart('taak/addTaak/client_id/'.$this->uri->segment(4).'/medewerker_id/'.$this->uri->segment(6));
		}
    	
			?> 
    		<ul>
    		<fieldset>
			<legend>Taken toevoegen</legend>
    		
    		<div>
				<label for="onderwerp">onderwerp</label>
				<input type="text" name="onderwerp" value="<?php echo set_value('onderwerp'); ?>" class="large input-text" />
				<?php if(form_error('onderwerp')):?><small class="form-field error"><?php echo form_error('onderwerp'); ?></small> <?php endif;?>
			</div>
    		
    		<div>
				<label for="beschrijving">beschrijving</label>
				<input type="text" name="beschrijving" value="<?php echo set_value('beschrijving'); ?>" class="large input-text" />
				<?php if(form_error('beschrijving')):?><small class="form-field error"><?php echo form_error('beschrijving'); ?></small> <?php endif;?>
			</div>
			
			<div>
				<label for="aantal_minuten">aantal minuten</label>
     			<input type="text" name="aantal_minuten" value="<?php echo set_value('aantal_minuten'); ?>" class="large input-text" />
				<?php if(form_error('aantal_minuten')):?><small class="form-field error"><?php echo form_error('aantal_minuten'); ?></small> <?php endif;?>
          	</div> 
            
            <li><label for="tijdstip">tijdstip</label>
            <?php
            $rij = $query2->row();
			$options = array();
					for($i=0; $i<24; $i++){
						if($i < 10){
							array_push($options, '0'.(string)$i);
						}
						else {
							array_push($options, (string)$i);	
						}
					}		
				echo form_dropdown('uur', $options, 0, 'name ="tijdstip"'); 
				?> : <?php 
				$options2 = array();
				for($i=0; $i<6; $i++){
					if($i == 0)
					{
						array_push($options2, '0'.(string)$i);
					}
					else {
						array_push($options2, (string)$i.'0');	
					}
				}
						
				echo form_dropdown('minuten', $options2, 0); 
			?>			
			</li>
            
            <div>
				<label for="yadayadadatepicker">datum</label>
     			<input type="text" name="yadayadadatepicker"  id="yadayadadatepicker" value="<?php echo set_value('yadayadadatepicker'); ?>" class="large input-text" />
				<?php if(form_error('yadayadadatepicker')):?><small class="form-field error"><?php echo form_error('yadayadadatepicker'); ?></small> <?php endif;?>
          	</div> 
            
            <div>
            	<li><label for="medewerker">medewerker/uitvoerder</label>
            	<?php 
					function array_push_assoc($array, $key, $value){
						$array[$key] = $value;
						return $array;
					}
					
					$opties = array();
					if(isset($medewerker)):
					foreach ($medewerker as $row):
						$opties = array_push_assoc($opties, $row->medewerker_id, $row->voornaam.' '.$row->achternaam);
					endforeach;
					endif;
					
					if($this->uri->segment(6) === FALSE){
						echo form_dropdown('medewerker', $opties, 0); 
						
					}
					else {
						echo form_dropdown('medewerker', $opties, $this->uri->segment(6)); 
						?>
                          <div>
            					<li><label for="client">client</label></li>
                        <?php
						$opties3 = array();
						if(isset($clienten)):
						foreach ($clienten as $row):
							$opties3 = array_push_assoc($opties3, $row->client_id, $row->voornaam);
						endforeach;
						endif;
						echo form_dropdown('clienten', $opties3, 0);
					}
					
				?>
                		</div>
            </div>
            
            
       		<?php echo form_submit('Submit', 'Taak toevoegen', 'class="white radius nice button"'); 
       		?>  <br> <br> </fieldset> </ul> 